﻿/// <reference path="../jquery.min.js" />
/// <reference path="../module/rsseasy.v2.js" />
/// <reference path="../module/adapter.js" />

$(function () {
    var wrap = $("#locationlistenerpage div");
    JsAdapter.onLocationReceive = function (json) {
        wrap.html(JSON.stringify(json));
    }

    $("#locationlistener").click(function () {
        JsAdapter.LocationListener().Submit();
    });

    $("#locationlisteneronce").click(function () {
        JsAdapter.LocationListener({ "once": "1" }).Submit();
    });

    $("#locationlistenertime").click(function () {
        JsAdapter.LocationListener({ "time": 5000 }).Submit();
    });

    $("#locationlistenerstop").click(function () {
        JsAdapter.LocationListener({ "stop": 1 }).Submit();
    });
});